<?
include('../inst.conf.php');
$this_Path= "http://".$_SERVER['HTTP_HOST'].substr( $_SERVER['SCRIPT_NAME'], 0, (strrpos($_SERVER['SCRIPT_NAME'],"/")+1));

if(@$_GET['type'] == 'newuser'){
	$myFile = "Nieuwe_gebruiker.html";
	
}elseif(@$_GET['type'] == 'newadmin'){
	$myFile = "Nieuwe_admin.html";

}elseif(@$_GET['type'] == 'nowAdmin'){
	$myFile = "nu_admin.html";

}elseif(@$_GET['type'] == 'password'){
	$myFile = "Nieuw_wachtwoord.html";
	
}
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);

$theData= str_replace("%pathtofile%", $this_Path, $theData);
$theData= str_replace("%date%", 	 @$_GET['date'], $theData);
$theData= str_replace("%name%", 	 @$_GET['name'], $theData);
$theData= str_replace("%adminname%", @$_GET['adminname'], $theData);
$theData= str_replace("%code%", 	 @$_GET['code'], $theData);
$theData= str_replace("%username%",  @$_GET['username'], $theData);
$theData= str_replace("%password%",  @$_GET['password'], $theData);
$theData= str_replace("%hash1%",	 @$_GET['hash1'], $theData);
$theData= str_replace("%hash2%",	 @$_GET['hash2'], $theData);
$theData= str_replace("%disclaimer%", $cfg['mail']['disclaimer'], $theData);


echo $theData; 
?>